package cn.itcast.scala.course06

/**
  * 异常处理
  * create by zhangtian on 2019/1/8
  */
object ExceptionApp extends App {

  try{
    val i = 10 / 0
  }catch {
    case e: ArithmeticException => println("除数不能为数字")
    case e: Exception => println(e.getMessage)
  } finally {
    println("我总会被执行")
  }
}
